package ruifight.member.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class CarInfoExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public CarInfoExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andCarInfoIdIsNull() {
            addCriterion("carInfoId is null");
            return (Criteria) this;
        }

        public Criteria andCarInfoIdIsNotNull() {
            addCriterion("carInfoId is not null");
            return (Criteria) this;
        }

        public Criteria andCarInfoIdEqualTo(Long value) {
            addCriterion("carInfoId =", value, "carInfoId");
            return (Criteria) this;
        }

        public Criteria andCarInfoIdNotEqualTo(Long value) {
            addCriterion("carInfoId <>", value, "carInfoId");
            return (Criteria) this;
        }

        public Criteria andCarInfoIdGreaterThan(Long value) {
            addCriterion("carInfoId >", value, "carInfoId");
            return (Criteria) this;
        }

        public Criteria andCarInfoIdGreaterThanOrEqualTo(Long value) {
            addCriterion("carInfoId >=", value, "carInfoId");
            return (Criteria) this;
        }

        public Criteria andCarInfoIdLessThan(Long value) {
            addCriterion("carInfoId <", value, "carInfoId");
            return (Criteria) this;
        }

        public Criteria andCarInfoIdLessThanOrEqualTo(Long value) {
            addCriterion("carInfoId <=", value, "carInfoId");
            return (Criteria) this;
        }

        public Criteria andCarInfoIdIn(List<Long> values) {
            addCriterion("carInfoId in", values, "carInfoId");
            return (Criteria) this;
        }

        public Criteria andCarInfoIdNotIn(List<Long> values) {
            addCriterion("carInfoId not in", values, "carInfoId");
            return (Criteria) this;
        }

        public Criteria andCarInfoIdBetween(Long value1, Long value2) {
            addCriterion("carInfoId between", value1, value2, "carInfoId");
            return (Criteria) this;
        }

        public Criteria andCarInfoIdNotBetween(Long value1, Long value2) {
            addCriterion("carInfoId not between", value1, value2, "carInfoId");
            return (Criteria) this;
        }

        public Criteria andCarBrandIsNull() {
            addCriterion("carBrand is null");
            return (Criteria) this;
        }

        public Criteria andCarBrandIsNotNull() {
            addCriterion("carBrand is not null");
            return (Criteria) this;
        }

        public Criteria andCarBrandEqualTo(String value) {
            addCriterion("carBrand =", value, "carBrand");
            return (Criteria) this;
        }

        public Criteria andCarBrandNotEqualTo(String value) {
            addCriterion("carBrand <>", value, "carBrand");
            return (Criteria) this;
        }

        public Criteria andCarBrandGreaterThan(String value) {
            addCriterion("carBrand >", value, "carBrand");
            return (Criteria) this;
        }

        public Criteria andCarBrandGreaterThanOrEqualTo(String value) {
            addCriterion("carBrand >=", value, "carBrand");
            return (Criteria) this;
        }

        public Criteria andCarBrandLessThan(String value) {
            addCriterion("carBrand <", value, "carBrand");
            return (Criteria) this;
        }

        public Criteria andCarBrandLessThanOrEqualTo(String value) {
            addCriterion("carBrand <=", value, "carBrand");
            return (Criteria) this;
        }

        public Criteria andCarBrandLike(String value) {
            addCriterion("carBrand like", value, "carBrand");
            return (Criteria) this;
        }

        public Criteria andCarBrandNotLike(String value) {
            addCriterion("carBrand not like", value, "carBrand");
            return (Criteria) this;
        }

        public Criteria andCarBrandIn(List<String> values) {
            addCriterion("carBrand in", values, "carBrand");
            return (Criteria) this;
        }

        public Criteria andCarBrandNotIn(List<String> values) {
            addCriterion("carBrand not in", values, "carBrand");
            return (Criteria) this;
        }

        public Criteria andCarBrandBetween(String value1, String value2) {
            addCriterion("carBrand between", value1, value2, "carBrand");
            return (Criteria) this;
        }

        public Criteria andCarBrandNotBetween(String value1, String value2) {
            addCriterion("carBrand not between", value1, value2, "carBrand");
            return (Criteria) this;
        }

        public Criteria andCarBuyingDateIsNull() {
            addCriterion("carBuyingDate is null");
            return (Criteria) this;
        }

        public Criteria andCarBuyingDateIsNotNull() {
            addCriterion("carBuyingDate is not null");
            return (Criteria) this;
        }

        public Criteria andCarBuyingDateEqualTo(Date value) {
            addCriterionForJDBCDate("carBuyingDate =", value, "carBuyingDate");
            return (Criteria) this;
        }

        public Criteria andCarBuyingDateNotEqualTo(Date value) {
            addCriterionForJDBCDate("carBuyingDate <>", value, "carBuyingDate");
            return (Criteria) this;
        }

        public Criteria andCarBuyingDateGreaterThan(Date value) {
            addCriterionForJDBCDate("carBuyingDate >", value, "carBuyingDate");
            return (Criteria) this;
        }

        public Criteria andCarBuyingDateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("carBuyingDate >=", value, "carBuyingDate");
            return (Criteria) this;
        }

        public Criteria andCarBuyingDateLessThan(Date value) {
            addCriterionForJDBCDate("carBuyingDate <", value, "carBuyingDate");
            return (Criteria) this;
        }

        public Criteria andCarBuyingDateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("carBuyingDate <=", value, "carBuyingDate");
            return (Criteria) this;
        }

        public Criteria andCarBuyingDateIn(List<Date> values) {
            addCriterionForJDBCDate("carBuyingDate in", values, "carBuyingDate");
            return (Criteria) this;
        }

        public Criteria andCarBuyingDateNotIn(List<Date> values) {
            addCriterionForJDBCDate("carBuyingDate not in", values, "carBuyingDate");
            return (Criteria) this;
        }

        public Criteria andCarBuyingDateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("carBuyingDate between", value1, value2, "carBuyingDate");
            return (Criteria) this;
        }

        public Criteria andCarBuyingDateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("carBuyingDate not between", value1, value2, "carBuyingDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceStartDateIsNull() {
            addCriterion("insuranceStartDate is null");
            return (Criteria) this;
        }

        public Criteria andInsuranceStartDateIsNotNull() {
            addCriterion("insuranceStartDate is not null");
            return (Criteria) this;
        }

        public Criteria andInsuranceStartDateEqualTo(Date value) {
            addCriterionForJDBCDate("insuranceStartDate =", value, "insuranceStartDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceStartDateNotEqualTo(Date value) {
            addCriterionForJDBCDate("insuranceStartDate <>", value, "insuranceStartDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceStartDateGreaterThan(Date value) {
            addCriterionForJDBCDate("insuranceStartDate >", value, "insuranceStartDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceStartDateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("insuranceStartDate >=", value, "insuranceStartDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceStartDateLessThan(Date value) {
            addCriterionForJDBCDate("insuranceStartDate <", value, "insuranceStartDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceStartDateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("insuranceStartDate <=", value, "insuranceStartDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceStartDateIn(List<Date> values) {
            addCriterionForJDBCDate("insuranceStartDate in", values, "insuranceStartDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceStartDateNotIn(List<Date> values) {
            addCriterionForJDBCDate("insuranceStartDate not in", values, "insuranceStartDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceStartDateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("insuranceStartDate between", value1, value2, "insuranceStartDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceStartDateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("insuranceStartDate not between", value1, value2, "insuranceStartDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceEndDateIsNull() {
            addCriterion("insuranceEndDate is null");
            return (Criteria) this;
        }

        public Criteria andInsuranceEndDateIsNotNull() {
            addCriterion("insuranceEndDate is not null");
            return (Criteria) this;
        }

        public Criteria andInsuranceEndDateEqualTo(Date value) {
            addCriterionForJDBCDate("insuranceEndDate =", value, "insuranceEndDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceEndDateNotEqualTo(Date value) {
            addCriterionForJDBCDate("insuranceEndDate <>", value, "insuranceEndDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceEndDateGreaterThan(Date value) {
            addCriterionForJDBCDate("insuranceEndDate >", value, "insuranceEndDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceEndDateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("insuranceEndDate >=", value, "insuranceEndDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceEndDateLessThan(Date value) {
            addCriterionForJDBCDate("insuranceEndDate <", value, "insuranceEndDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceEndDateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("insuranceEndDate <=", value, "insuranceEndDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceEndDateIn(List<Date> values) {
            addCriterionForJDBCDate("insuranceEndDate in", values, "insuranceEndDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceEndDateNotIn(List<Date> values) {
            addCriterionForJDBCDate("insuranceEndDate not in", values, "insuranceEndDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceEndDateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("insuranceEndDate between", value1, value2, "insuranceEndDate");
            return (Criteria) this;
        }

        public Criteria andInsuranceEndDateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("insuranceEndDate not between", value1, value2, "insuranceEndDate");
            return (Criteria) this;
        }

        public Criteria andCarStateIsNull() {
            addCriterion("carState is null");
            return (Criteria) this;
        }

        public Criteria andCarStateIsNotNull() {
            addCriterion("carState is not null");
            return (Criteria) this;
        }

        public Criteria andCarStateEqualTo(Integer value) {
            addCriterion("carState =", value, "carState");
            return (Criteria) this;
        }

        public Criteria andCarStateNotEqualTo(Integer value) {
            addCriterion("carState <>", value, "carState");
            return (Criteria) this;
        }

        public Criteria andCarStateGreaterThan(Integer value) {
            addCriterion("carState >", value, "carState");
            return (Criteria) this;
        }

        public Criteria andCarStateGreaterThanOrEqualTo(Integer value) {
            addCriterion("carState >=", value, "carState");
            return (Criteria) this;
        }

        public Criteria andCarStateLessThan(Integer value) {
            addCriterion("carState <", value, "carState");
            return (Criteria) this;
        }

        public Criteria andCarStateLessThanOrEqualTo(Integer value) {
            addCriterion("carState <=", value, "carState");
            return (Criteria) this;
        }

        public Criteria andCarStateIn(List<Integer> values) {
            addCriterion("carState in", values, "carState");
            return (Criteria) this;
        }

        public Criteria andCarStateNotIn(List<Integer> values) {
            addCriterion("carState not in", values, "carState");
            return (Criteria) this;
        }

        public Criteria andCarStateBetween(Integer value1, Integer value2) {
            addCriterion("carState between", value1, value2, "carState");
            return (Criteria) this;
        }

        public Criteria andCarStateNotBetween(Integer value1, Integer value2) {
            addCriterion("carState not between", value1, value2, "carState");
            return (Criteria) this;
        }

        public Criteria andCreateDateIsNull() {
            addCriterion("createDate is null");
            return (Criteria) this;
        }

        public Criteria andCreateDateIsNotNull() {
            addCriterion("createDate is not null");
            return (Criteria) this;
        }

        public Criteria andCreateDateEqualTo(Date value) {
            addCriterion("createDate =", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotEqualTo(Date value) {
            addCriterion("createDate <>", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateGreaterThan(Date value) {
            addCriterion("createDate >", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateGreaterThanOrEqualTo(Date value) {
            addCriterion("createDate >=", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateLessThan(Date value) {
            addCriterion("createDate <", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateLessThanOrEqualTo(Date value) {
            addCriterion("createDate <=", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateIn(List<Date> values) {
            addCriterion("createDate in", values, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotIn(List<Date> values) {
            addCriterion("createDate not in", values, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateBetween(Date value1, Date value2) {
            addCriterion("createDate between", value1, value2, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotBetween(Date value1, Date value2) {
            addCriterion("createDate not between", value1, value2, "createDate");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}